# import os
# import sys
# # print(os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))))
#
# def get_cur_info():
#     print(sys._getframe().f_code.co_name)
#     print(sys._getframe().f_back.f_code.co_name)
#     print(sys._getframe().f_back.f_code.co_filename)
#     print(sys._getframe().f_back.f_line)
#     # f = sys.exc_info()[2].tb_frame.f_back
#     # print(f.f_code.co_name, f.f_lineno)
#
# get_cur_info()
# import urllib.request,io
# from PIL import Image
# url = 'http://xujiang5.xicp.io:5000/group1/M00/00/00/wKgfvFqqWmOADQPrAIOVtI6ht0Y442.jpg'
# file = urllib.request.urlopen(url)
# tmpIm = io.BytesIO(file.read())
# im = Image.open(tmpIm)
# print(im.format, im.size, im.mode)
#
# from threading import Thread, Event
# import time
#
#
# # Code to execute in an independent thread
# def countdown(n, started_evt):
#     print('countdown starting')
#
#
#     while n > 0:
#         print('T-minus', n)
#         started_evt.set()
#         n -= 1
#         time.sleep(5)
#
#
#
# # Create the event object that will be used to signal startup
# started_evt = Event()
# # Launch the thread and pass the startup event
# print('Launching countdown')
# t = Thread(target=countdown, args=(10, started_evt))
# t.start()
#
# # Wait for the thread to start
# started_evt.wait()
#
# print('countdown is running')
# started_evt.wait()
#
# print('countdown is running')
# started_evt.wait()
#
# print('countdown is running')
# started_evt.wait()
#
# print('countdown is running')
str = "CN201811020528"
result = "[C][ ]{0,}[N][ ]{0,}[2][ ]{0,}[0][ ]{0,}[1][ ]{0,}[8][ ]{0,}[1][ ]{0,}[1][ ]{0,}[0][ ]{0,}[2][ ]{0,}[0][ ]{0,}[5][ ]{0,}[2][ ]{0,}[8][ ]{0,}[ ]{0,}"
test = "[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[%s][ ]{0,}[ ]{0,}"
print(test % tuple(str))